import Vue from 'vue'
import App from './App'
import util from './common/util'
import store from './store'
import config from './config.js'
import request from './common/request.js'

// 统一提示
function msg(title = "", duration = 1000, icon = 'none', mask = false) {
	uni.showToast({
		title: title,
		duration: duration,
		icon: icon ,// none success loading
		mask:mask
	});
}

const prePage = function(){
	let pages = getCurrentPages();
	let prePage = pages[pages.length - 2];
}

// 挂载全局方法
Vue.config.productionTip = false
Vue.prototype.$request = request;
Vue.prototype.$msg = msg;
Vue.prototype.$prePage = prePage
Vue.prototype.$store = store
Vue.prototype.$util = util
Vue.prototype.$config = config

App.mpType = 'app'
const app = new Vue({
    ...App
})
app.$mount()
